import request from '@/utils/request'

// 查询供客列表
export function listSupply(query) {
  return request({
    url: '/supermarket/supply/list',
    method: 'get',
    params: query
  })
}

export function listSupplyOne(query) {
  return request({
    url: '/supermarket/supply/listOne',
    method: 'get',
    params: query
  })
}
// 查询供应商、客户列表
export function listSupplyGK(type) {
  return request({
    url: '/supermarket/supply/gkList/'+ type,
    method: 'get'
  })
}

// 查询供客详细
export function getSupply(supplyId) {
  return request({
    url: '/supermarket/supply/' + supplyId,
    method: 'get'
  })
}

// 新增供客
export function addSupply(data) {
  return request({
    url: '/supermarket/supply',
    method: 'post',
    data: data
  })
}

// 修改供客
export function updateSupply(data) {
  return request({
    url: '/supermarket/supply',
    method: 'put',
    data: data
  })
}

// 删除供客
export function delSupply(supplyId) {
  return request({
    url: '/supermarket/supply/' + supplyId,
    method: 'delete'
  })
}
export function shSupply(data) {
  return request({
    url: '/supermarket/supply/sh',
    method: 'put',
    data: data
  })
}
export function qjSupply(supplyId) {
  return request({
    url: '/supermarket/supply/status/' + supplyId,
    method: 'get'
  })
}

